import * as api from '../service'
import cookie from 'js-cookie'

import storeExtend from '@/utils/storeExtend'
import grid from '@/store/common/grid'

export default storeExtend(grid(api), {
  actions: {
    async DoFetchRoles({commit}, payload) {
			return await api.fetchRoles()
		},
		async DoAuthUserInfo({commit}, {id, role}) {
			return await api.auth(id, {roleIds:role})
    },
    async sendMsgToUser({commit}, payload) {
      return await api.sendMsgToUser(payload)
    }
  }
})
